From: Florian Müllner Date: Sat, 28 Mar 2020 02:37:50 +0000 (+0100) Subject: volume: Cancel before checking state X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~18 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=97fe4f761a194682c9d1597f364a0476f04ff324;p=gnome-shell.git volume: Cancel before checking state Since commit 2894085c45 we omit sound feedback on volume changes if something is already outputting sound. Unfortunately that "something" may be our own feedback (from a previous volume change). In that case we do not want to omit the new feedback, so instead cancel the previous one. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1147 --- diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 434dcfbf7..e8a787c4d 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -138,11 +138,12 @@ var StreamSlider = class { } _notifyVolumeChange() { - if (this._stream.state === Gvc.MixerStreamState.RUNNING) - return; // feedback not necessary while playing - if (this._volumeCancellable) this._volumeCancellable.cancel(); + this._volumeCancellable = null; + + if (this._stream.state === Gvc.MixerStreamState.RUNNING) + return; // feedback not necessary while playing this._volumeCancellable = new Gio.Cancellable(); let player = global.display.get_sound_player();